1 2 3
A LET statement can do quite a bit of work. You have seen examples of this already. Consider this statement:
LET SUM = A + 23
.
Here is a summary of what can happen:
The calculation on the right of the equal sign is carried out just
as for any arithmetic expression.
To get that value you can (temporarily) forget that it is part of
a LET
statement.
Once a value is "in hand" it replaces the contents of the variable to the left of the equal sign. There should only be one variable there.
What does the following program print?
' LET example ' LET A = 2 LET B = 4 LET C = (A + B) / 2 PRINT A, B, C END